<?php

namespace App\Http\Models;

use Illuminate\Database\Eloquent\Model;

class ArticleModel extends Model
{
    protected $table = 'article';
    public $timestamps = false;
    protected $guarded = [''];

    public function category_article($category_id){

        $article=  ArticleModel::where(['category_id'=>$category_id])->paginate(4)->toArray();
        return  $article['data'];

    }

}
